import Layout from '@/layout'

/**
  * @group 物流管理
  */
const logisticsRouter =
{
  path: '/logistics',
  name: 'logistics-group',
  component: Layout,
  meta: { title: '物流管理', icon: 'example', roles: ['m5100'] },
  children: [
    {
      path: 'cars/:iswarning',
      component: (resolve) => require(['@/views/logistics-group/cars-manage/index'], resolve),
      name: 'Cars',
      remoteParam: { serviceName: 'wms', path: '/api/logistics/car/' },
      remoteUrl: '',
      meta: { title: '车辆管理', roles: ['m5110'] }
    },
    {
      path: '/Cars/edit/:no',
      name: 'CarsEdit',
      component: (resolve) => require(['@/views/logistics-group/cars-manage/edit'], resolve),
      meta: { title: '车辆管理-' },
      remoteUrl: '',
      hidden: true
    },
    {
      path: 'personnel',
      component: (resolve) => require(['@/views/logistics-group/personnel-manage/index'], resolve),
      name: 'Personnel',
      remoteParam: { serviceName: 'wms', path: '/api/logistics/driver/' },
      remoteUrl: '',
      meta: { title: '驾驶员管理', roles: ['m5120'] }
    },
    {
      path: '/personnel/edit/:no',
      name: 'PersonnelEdit',
      component: (resolve) => require(['@/views/logistics-group/personnel-manage/edit'], resolve),
      meta: { title: '驾驶员管理-' },
      remoteUrl: '',
      hidden: true
    },
    {
      path: 'transport/:status',
      component: (resolve) => require(['@/views/logistics-group/transport-manage/index'], resolve),
      name: 'Transport',
      remoteParam: { serviceName: 'wms', path: '/api/logistics/order/' },
      remoteUrl: '',
      props: true,
      meta: { title: '运输单管理', roles: ['m5140'] }
    },
    {
      path: '/transport/edit/:no',
      name: 'TransportEdit',
      component: (resolve) => require(['@/views/logistics-group/transport-manage/edit'], resolve),
      meta: { title: '运输单管理-' },
      remoteUrl: '',
      hidden: true
    },
    {
      path: 'settlement',
      component: (resolve) => require(['@/views/logistics-group/settlement-manage/index'], resolve),
      name: 'Settlement',
      remoteParam: { serviceName: 'wms', path: '/api/logistics/order/batch' },
      remoteUrl: '',
      props: true,
      meta: { title: '运输结算单管理', roles: ['m5180'] }
    },

    {
      path: 'costClass',
      component: (resolve) => require(['@/views/logistics-group/cost-class-manage/index'], resolve),
      name: 'CostClass',
      remoteParam: { serviceName: 'wms', path: '/api/logistics/expenses-category/' },
      remoteUrl: '',
      meta: { title: '支出单分类管理', roles: ['m5150'] }
    },
    {
      path: '/costClass/edit/:no',
      name: 'CostClassEdit',
      component: (resolve) => require(['@/views/logistics-group/cost-class-manage/edit'], resolve),
      meta: { title: '支出单分类管理-' },
      remoteUrl: '',
      hidden: true
    },
    {
      path: 'cost',
      component: (resolve) => require(['@/views/logistics-group/cost-manage/index'], resolve),
      name: 'Cost',
      remoteParam: { serviceName: 'wms', path: '/api/logistics/expenses-info/' },
      remoteUrl: '',
      meta: { title: '支出单管理', roles: ['m5160'] }
    },
    {
      path: '/cost/edit/:no',
      name: 'CostEdit',
      component: (resolve) => require(['@/views/logistics-group/cost-manage/edit'], resolve),
      meta: { title: '支出单管理-' },
      remoteUrl: '',
      hidden: true
    },
    {
      path: 'backCar:type',
      component: (resolve) => require(['@/views/logistics-group/back-car-manage/index'], resolve),
      name: 'BackCar',
      remoteParam: { serviceName: 'wms', path: '/api/logistics/car-subscribe/' },
      remoteUrl: '',
      meta: { title: '回头车管理', roles: ['m5170'] }
    },
    {
      path: '/BackCar/edit/:no',
      name: 'BackCarEdit',
      component: (resolve) => require(['@/views/logistics-group/back-car-manage/edit'], resolve),
      meta: { title: '回头车管理-' },
      remoteUrl: '',
      hidden: true
    },
    {
      path: '/transportBi',
      name: 'TransportBi',
      component: (resolve) => require(['@/views/logistics-group/transportBi-manage/index'], resolve),
      meta: { title: '运输分析报表', roles: ['m5190'] },
      remoteUrl: '',
      remoteParam: { serviceName: 'wms', path: '/api/logistics/expenses-info/analyze/' }
    }
  ]
}
export default logisticsRouter
